Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debian: add extra package build routines #515

Open
wants to merge 1 commit into
base: linux-6.6.y
Choose a base branch
from

Conversation

MingcongBai
Copy link
Contributor

  • Introduce Debian routines to build kernel tools and documentation in addition to the image, header, and libc-dev packages generated with build_kernel.sh. 1
  • Introduce a linux-tools metapackage to ease tools installation.

And remove linux-image*, linux-libc-dev*, and linux-support* to remove unneeded packages (some of those needed are generated with our build_kernel.sh script).

Footnotes

  1. Build these packages with:

    apt build-dep .
    dpkg-buildpackage -uc -us


Config Files
------------
The .config files used to build the various linux-image files are dynamically
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

=======================

There is a checklist in the kernel-team.git repository; see
<https://salsa.debian.org/kernel-team/kernel-team/-/blob/master/docs/kernel-upload-checklist.md>.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

@@ -0,0 +1,111 @@
#!/usr/bin/python3

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Missing or malformed SPDX-License-Identifier tag in line 2

class CheckImage(object):
def __init__(self, config, dir, arch, featureset, flavour):
self.dir = dir
self.arch, self.featureset, self.flavour = arch, featureset, flavour
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

# not the case.
usage = (float(size)/value) * 100.0
out.write('Image size %d/%d, using %.2f%%. ' % (size, value, usage))
if size > value:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: patch seems to be corrupt (line wrapped?)

@@ -0,0 +1,28 @@
#!/bin/sh -e

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Missing or malformed SPDX-License-Identifier tag in line 2

for patchdir in debian/patches*; do
sed '/^#/d; /^[[:space:]]*$/d; /^X /d; s/^+ //; s,^,'"$patchdir"'/,' "$patchdir"/series
done | sort -u > $TMPDIR/used
find debian/patches* ! -path '*/series' -type f -name "*.diff" -o -name "*.patch" -printf "%p\n" | sort > $TMPDIR/avail
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)


def read(self, file):
for line in file:
version, name, module, export, namespace = \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)


def read(self, file):
for line in file:
version, name, module, export, namespace = \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: trailing whitespace


def read(self, file):
for line in file:
version, name, module, export, namespace = \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: patch seems to be corrupt (line wrapped?)


# Using OrderedDict instead of dict makes the pickled config reproducible
class ConfigCore(collections.OrderedDict):
def get_merge(self, section, arch, featureset, flavour, key, default=None):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

def _convert_one(self, schema, data):
ret = {}
for key, value in data.items():
value = value.replace('\n', ' ')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: patch seems to be corrupt (line wrapped?)

compiler_gnutype: Optional[str] = None
compiler_gnutype_compat: Optional[str] = None
config: list[Path] = dataclasses.field(default_factory=list)
config_default: list[Path] = dataclasses.field(default_factory=list, repr=False)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)



class FirmwareFile(object):
def __init__(self, binary, desc=None, source=None, version=None) -> None:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

if in_header:
continue

if line == '\n':
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: patch seems to be corrupt (line wrapped?)

assert a.long == []

def test_init_str(self) -> None:
a = PackageDescription('Short\nLong1\n.\nLong2')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: patch seems to be corrupt (line wrapped?)

a = PackageRelationEntry('package (>=version) [arch2 arch1] <profile1 >')
assert a.name == 'package'
assert a.version == 'version'
assert a.arches == {'arch1', 'arch2'}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)


return value[0]

def get_control(self, key: str, context: dict[str, str] = {}) -> BinaryPackage:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

@@ -0,0 +1,30 @@
#!/bin/bash
set -euE
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Missing or malformed SPDX-License-Identifier tag in line 2

trap "rm -rf '$TMP'" EXIT

function git {
command git -c advice.detachedHead=false -c init.defaultBranch=main -C "$TMP" "$@"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: trailing whitespace

}

git init -q
git remote add origin "$REPO"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: trailing whitespace


git init -q
git remote add origin "$REPO"
git fetch -q --depth 1 origin "$COMMIT_BASE"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: trailing whitespace

popd > /dev/null
done

for i in control rules.gen generated.signed-amd64 generated.signed-arm64; do
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

@@ -0,0 +1,109 @@
#!/usr/bin/python3

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Missing or malformed SPDX-License-Identifier tag in line 2

with open(path, 'w') as patch:
in_header = True
for line in source_patch:
if in_header and re.match(r'^(\n|[^\w\s]|Index:)', line):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: patch seems to be corrupt (line wrapped?)

args = ['git', 'format-patch', '--subject-prefix=', range]
format_proc = subprocess.Popen(args,
cwd=os.path.join(patch_dir,
lockdown_patch_dir),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

@@ -0,0 +1,39 @@
#!/usr/bin/python3

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Missing or malformed SPDX-License-Identifier tag in line 2

@@ -0,0 +1,18 @@
#!/bin/sh

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Missing or malformed SPDX-License-Identifier tag in line 2

# not the case.
usage = (float(size)/value) * 100.0
out.write('Image size %d/%d, using %.2f%%. ' % (size, value, usage))
if size > value:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: patch seems to be corrupt (line wrapped?)

@@ -0,0 +1,28 @@
#!/bin/sh -e

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Missing or malformed SPDX-License-Identifier tag in line 2

for patchdir in debian/patches*; do
sed '/^#/d; /^[[:space:]]*$/d; /^X /d; s/^+ //; s,^,'"$patchdir"'/,' "$patchdir"/series
done | sort -u > $TMPDIR/used
find debian/patches* ! -path '*/series' -type f -name "*.diff" -o -name "*.patch" -printf "%p\n" | sort > $TMPDIR/avail

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)


def read(self, file):
for line in file:
version, name, module, export, namespace = \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)


def read(self, file):
for line in file:
version, name, module, export, namespace = \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: trailing whitespace


def read(self, file):
for line in file:
version, name, module, export, namespace = \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: patch seems to be corrupt (line wrapped?)


# Using OrderedDict instead of dict makes the pickled config reproducible
class ConfigCore(collections.OrderedDict):
def get_merge(self, section, arch, featureset, flavour, key, default=None):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

def _convert_one(self, schema, data):
ret = {}
for key, value in data.items():
value = value.replace('\n', ' ')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: patch seems to be corrupt (line wrapped?)

compiler_gnutype: Optional[str] = None
compiler_gnutype_compat: Optional[str] = None
config: list[Path] = dataclasses.field(default_factory=list)
config_default: list[Path] = dataclasses.field(default_factory=list, repr=False)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)



class FirmwareFile(object):
def __init__(self, binary, desc=None, source=None, version=None) -> None:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

if in_header:
continue

if line == '\n':

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: patch seems to be corrupt (line wrapped?)

assert a.long == []

def test_init_str(self) -> None:
a = PackageDescription('Short\nLong1\n.\nLong2')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: patch seems to be corrupt (line wrapped?)

a = PackageRelationEntry('package (>=version) [arch2 arch1] <profile1 >')
assert a.name == 'package'
assert a.version == 'version'
assert a.arches == {'arch1', 'arch2'}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)


return value[0]

def get_control(self, key: str, context: dict[str, str] = {}) -> BinaryPackage:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

@@ -0,0 +1,30 @@
#!/bin/bash
set -euE

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Missing or malformed SPDX-License-Identifier tag in line 2

trap "rm -rf '$TMP'" EXIT

function git {
command git -c advice.detachedHead=false -c init.defaultBranch=main -C "$TMP" "$@"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: trailing whitespace

}

git init -q
git remote add origin "$REPO"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: trailing whitespace


git init -q
git remote add origin "$REPO"
git fetch -q --depth 1 origin "$COMMIT_BASE"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: trailing whitespace

popd > /dev/null
done

for i in control rules.gen generated.signed-amd64 generated.signed-arm64; do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

@@ -0,0 +1,109 @@
#!/usr/bin/python3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Missing or malformed SPDX-License-Identifier tag in line 2

with open(path, 'w') as patch:
in_header = True
for line in source_patch:
if in_header and re.match(r'^(\n|[^\w\s]|Index:)', line):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: patch seems to be corrupt (line wrapped?)

args = ['git', 'format-patch', '--subject-prefix=', range]
format_proc = subprocess.Popen(args,
cwd=os.path.join(patch_dir,
lockdown_patch_dir),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

@@ -0,0 +1,39 @@
#!/usr/bin/python3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Missing or malformed SPDX-License-Identifier tag in line 2

@@ -0,0 +1,18 @@
#!/bin/sh

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Missing or malformed SPDX-License-Identifier tag in line 2

@@ -0,0 +1,135 @@
#!/usr/bin/python3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Missing or malformed SPDX-License-Identifier tag in line 2

major_ver = re.sub(r'^(\d+)\..*', r'\1', cur_ver)
while cur_ver != new_ver:
next_ver = next_update(cur_ver)
print(' https://www.kernel.org/pub/linux/kernel/v{}.x/ChangeLog-{}'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

with open('debian/changelog.new', 'w') as new_log:
line_no = 0
inserted = False
intro_line = ' * {}\n'.format(changelog_intro)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: patch seems to be corrupt (line wrapped?)

@@ -0,0 +1,2 @@
#!/bin/sh -e
exec "$(dirname "$0")/stable-update" "$@"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: trailing whitespace

@@ -0,0 +1,2 @@
#!/bin/sh -e
exec "$(dirname "$0")/stable-update" "$@"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Missing or malformed SPDX-License-Identifier tag in line 2

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from avenger-285714. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants